﻿Baboons (TR3 / TR4)
====================

TRNG required (Tested with 1.2.2.6)

These 2 wads contain both types of baboons using TR4 sounds. 

In order to fix the baboons' magical death I did the following (anim14):

- remove the 'Die' animcommand
- changed the state-id to a non-death state-id
- kill it via NG animcommand 

If you have working baboons in your wad and only want to fix the magical death, the only thing you need to do is to import animation 14 (no script changes necessary)

(TRLE fixes for the magical death needed to keep the baboon technically alive, potentially exceeding the maximum number of active enemies per level with the result that the TR4 engine acted up)

CUST_KEEP_DEAD_ENEMIES works as expected (enabled or disabled)

Also I fixed animation 23 (baboon attacks Lara without jumping), now the baboon actually can hurt Lara (-5% HP per action; can be adjusted in the triggergroup below). 
It's necessary to copy the TG to your script and probably change its number - both in your script and in the NG animcommand (Set Position command)

RardRaider 
(In case you'd like to get in touch I'm easily to find on TRF and Twitter :)

========

;Animation 14, death animation, Frame 38

;Set Position [-32730] [14] [1280]
;
;Infos about exported trigger
;-------------------------------------------------------------------------------
;Set Trigger Type - ACTION 14
;<&> : Enemy. Kill <#>object in (E) way
;(E) : Kill Creature
;
;AnimCommand: Frame=38  MoveableIndex= <Index of owner of current AnimCommand>
;-------------------------------------------------------------------------------


;Animation 23, attack animation, Frame 7

Triggergroup=10, $9000+TGROUP_USE_OWNER_ANIM_ITEM_INDEX, IGNORE, $236, > ; Lara is within 2 clicks of baboon
                 $2000, 89, $D                                           ; hurt Lara: -5% HP 
                 
;Set Position [-24569] [118] [10]
;
;Infos about exported trigger
;-------------------------------------------------------------------------------
;Set Trigger Type - FLIPEFFECT 118
;Exporting: TRIGGER(10:0) for FLIPEFFECT(118)
;<#> : TriggerGroup. Perform <&>TriggerGroup from script.dat in (E)way
;<&> : TriggerGroup=   10
;(E) :  Mutiple performing (to use when in TriggerGroup there is some condition)
;
;AnimCommand: Frame=7  
;-------------------------------------------------------------------------------
          
When using f118 in an NG animcommand the last number is always the TriggerGroup and can be easily adjusted.
